export abstract class ApiService {
    private _url: string = 'http://www.algemstone.com';
    // private _url  = '127.0.0.1:3030';
    public storageKey  = 'aolvbao_jwt';
    public langStorageName  = 'aolvbao_lang';
    public storage: any = window.localStorage;

    get url(): string {
        return this._url;
    }

    protected FeathersError: any = {
        '400': {message_en: 'Badrequest please try again later', message_zh: '请求失败，请重试'},
        '401': {message_en: 'you have error with authenticate, please reload your Token', message_zh: '登录授权失败，请重试'},
        '402': {message_en: 'you have wrong payment data, please check out again', message_zh: '请求数据有误，请检查数据内容'},
        '403': {message_en: 'Request forbidden', message_zh: '您访问的是被禁止的请求，请检查您的权限'},
        '404': {message_en: 'We don\'t find your resource', message_zh: '未找到相应内容，请重试'},
        '405': {message_en: 'We can not handle your request, please try again later', message_zh: '您访问的是不被允许的方法'},
        '406': {message_en: 'We can not handle your request, please try again later', message_zh: '您访问的是不被允许的方法'},
        '408': {message_en: 'Request timeout, please try again later', message_zh: '请求超时，请稍后重试'},
        '409': {message_en: 'Request conflict, please try again later', message_zh: '请求遇到冲突，请重试'},
        '411': {message_en: 'Your payment have error, please try again later', message_zh: '请求数据有误，请检查输入内容'},
        '422': {message_en: 'We can not handle your request, please try again later', message_zh: '请求数据有误，请检查输入内容'},
        '429': {message_en: 'TooManyRequests', message_zh: '请求过于频繁，请休息休息'},
        '500': {message_en: 'We can not handle your request, please try again later', message_zh: '请求遇到冲突，请重试'},
        '501': {message_en: 'We can not handle your request, please try again later', message_zh: '请求遇到冲突，请重试'},
        '502': {message_en: 'Bad gateway, please try again later', message_zh: '请求错误，请重试'},
        '503': {message_en: 'We can not handle your request, please try again later', message_zh: '没有找到可用资源，请重试'}
    };

    public outLogger(tag: any, data: any) {
        console.log(tag, data);
    }


}